﻿using System;

namespace Core
{
    [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property)]
    public class UIFieldAttribute : BaseAttribute
    {
        public string Path { get; }

        /// <summary>
        /// 遇到Path路径不存在的情况，忽略报错
        /// </summary>
        public bool Ignore { get; }

        public UIFieldAttribute(string path, bool ignore = false)
        {
            Path = path;
            Ignore = ignore;
        }
    }

    [AttributeUsage(AttributeTargets.Class, Inherited = false)]
    public class WindowAttribute : BaseAttribute
    {
        public int Id { get; private set; }

        public WindowAttribute(int id)
        {
            Id = id;
        }
    }
}
